Use a “function” g(f)g(f) to generate a new image B from a given image A via:
B(i,j)=g(A(i,j))B(i,j)=g(A(i,j)), i=0,...,N−1i=0,...,N-1, j=0,...,M−1j=0,...,M-1

used to change Histogram

The function g(f)g(f) operates on each image pixel independently. All pixels with original gray level f are changed to have gray level g(f)g(f)

Properties that g(f)g(f) should satisfy

  • Monotonically non-decreasing, so that relative brightness of pixels do not change.
  • G(f)G(f) in the same range as original ff, i.e. with same min (e.g. 0) and max values (e.g. 255), and be integers for digital images.
    • Rounding/truncation may be needed

How to design the transformation function g(f)g(f)?

  • depends on the histogram of the original image hA(f)h_A(f) and the

desired histogram of the transformed image hB(f)h_B(f).

  • To enhance contrast, we like hB(f)h_B(f) to be as flat as possible.

Different approaches

  • Using fixed functional forms: linear, non-linear

  • Using adaptive transform, that is determined from hA(f)h_A(f) and hB(f)h_B(f):

    • Histogram equalization (hB(f)h_B(f ) is uniform): Fully automatic!
    • Histogram specification or matching
  • How to design the transformation function g(f)g(f)?

    • depends on the histogram of the original image hA(f)h_A(f) and the desired histogram of the transformed image hB(f)h_B(f).
  • To enhance contrast, we like hB(f)h_B(f) to be as flat as possible.

Different approaches

  • Using fixed functional forms: linear, non-linear
  • Using adaptive transform, that is determined from hA(f)h_A(f) and hB(f)h_B(f):
    • Histogram equalization (hB(f)h_B(f) is uniform): Fully automatic!
    • Histogram specification or matching

see: Nonlinear Stretching